<?php 
	class Person{
		public $name;
		public $gender;
		public function say(){
			echo $this->name,'is',$this->gender;
		}
	}
	$student=new Person();
	$student->name="Tome";
	$student->gender="male";
//	$student->say();
//	$teacher=new Person();
//	$teacher->name="Kate";
//	$teacher->gender="female";
//	$teacher->say();
//	print_r((array) $student);
//	var_dump($student);
	$str=serialize($student);
	file_put_contents("person.txt", $str);
//	$str1=file_get_contents("person.txt");
//	$student=unserialize($str1);
////	print_r((array) $student);
//	var_dump($student);
	$array=array('name'=>"Tome",'gender'=>"male");
	$str=serialize($array);
	file_put_contents("array.txt", $str);
	
